﻿@using Sausage.Web.Models
@using Sausage.Web.DataModel
@using Telerik.Web.Mvc.UI
@using Sausage.Web.Domain
@model DictionaryItemListRow
@{
    ViewBag.Title = "甘肃天水公路总段养护综合管理系统";
    Layout = "~/Views/Shared/MainLayout.cshtml";

    //用于保存项目类型信息
    List<string> categoryModels = new List<string>();

    //查询路线信息
    using (SausageEntities entities = new SausageEntities())
    {
        //查询所有角色信息
        foreach (DictionayItem item in entities.DictionayItem.Where(item => item.DictionayID == 2).OrderBy(item => item.ItemName).ToArray())
        {
            categoryModels.Add(string.Format("{{ boxLabel: \'{0}\', name: 'Categories', inputValue: '{1}', checked:true }}", item.ItemName, item.ItemID.ToString("D")));
        }
    }
}
@section HeadCssLink
{
    <link href="@Url.Content("~/Content/Styles/ext-patch.css")" rel="stylesheet" type="text/css" />
}
@section HeadScriptLink
{
    <script src="@Url.Content("~/Scripts/ExtJS/locale/ext-lang-zh_CN.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/common.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/model.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Sausage/ReportView/View.js")" type="text/javascript"></script>
    <script type="text/javascript">

        //养护汇总表窗体
        var win_maintain_summary = null;

        //养护组织结构
        var tree_maintain = null;

        //养护组织结构存储
        var store_maintain_organization = null;

        //养护汇总表窗体
        var win_maintain_month_summary = null;

        //养护组织结构
        var tree_maintain_month = null;

        //养护组织结构存储
        var store_maintain_month_organization = null;

        //用于保存类型信息
        var master_category =
        [
            @Html.Raw(System.String.Join(",", categoryModels))
        ];

        //用于保存数据类型
        var master_datatypes =
        [
            {
                boxLabel: '人工数据',
                name: 'DataTypes',
                inputValue: 0,
                checked:true
            },
            {
                boxLabel: '材料数据',
                name: 'DataTypes',
                inputValue: 1,
                checked:true
            },
            {
                boxLabel: '机械数据',
                name: 'DataTypes',
                inputValue: 2,
                checked:true
            },
            {
                boxLabel: '油料数据',
                name: 'DataTypes',
                inputValue: 3,
                checked:true
            },
            {
                boxLabel: '维修费用',
                name: 'DataTypes',
                inputValue: 4,
                checked:true
            }
        ];
    </script>
}
<div>
    <a class="ReportLink" title="养护日汇总表" href="javascript:void(0);" onclick="javascript:return ViewMaintainSummaryReport();">
        <img alt="养护日汇总表" src="@Url.Content("~/Content/Images/chart.gif")" />
        <span>养护日汇总表</span>
    </a>
    <a class="ReportLink" title="养护月汇总表" href="javascript:void(0);" onclick="javascript:return ViewMaintainMonthSummaryReport();">
        <img alt="养护月汇总表" src="@Url.Content("~/Content/Images/chart.gif")" />
        <span>养护月汇总表</span>
    </a>
</div>
